package com.hifar.test.syncData.pojo.VO;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.hifar.plat.AopOption.Dict;
import com.hifar.test.syncData.pojo.HfEnvSyncDataImportTableInfo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

/**
 * @author zhuWeiWei
 * @description 数据导入任务详情VO
 * @date 2025/10/29
 */
@Data
@ApiModel("数据导入任务详情")
public class SyncDataImportTaskDetailVO {

    @ApiModelProperty("任务ID")
    private String id;

    @ApiModelProperty("同步编码")
    private String syncCode;

    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty("导入开始时间")
    private Date startTime;

    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty("导入结束时间")
    private Date endTime;

    @ApiModelProperty("导入进度")
    private BigDecimal schedule;

    @ApiModelProperty("状态：1-未开始 2-导入中 3-导入失败 4-已导入")
    private String status;

    @ApiModelProperty("失败原因")
    private String remarks;

    @ApiModelProperty("导入文件路径")
    private String filePath;

    @ApiModelProperty("任务数量")
    private Integer taskCount;

    @ApiModelProperty("创建人")
    private String createUserName;

    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty("创建时间")
    private Date createTime;

    @ApiModelProperty("密级")
    @Dict(dictCode = "hf_sys_datasecret")
    private Integer secretLevel;

    @ApiModelProperty("密级文本")
    private String secretLevel_dictText;

    @ApiModelProperty("导入表详情列表")
    private List<HfEnvSyncDataImportTableInfo> tableInfoList;

    @ApiModelProperty("总插入数量")
    private Integer totalInsertNum;

    @ApiModelProperty("总更新数量")
    private Integer totalUpdateNum;

    @ApiModelProperty("附件总数")
    private Integer totalFileCount;

    @ApiModelProperty("附件成功数")
    private Integer successFileCount;

    @ApiModelProperty("附件失败数")
    private Integer failFileCount;
}

